define(['egis'], function (egis) {
    Window.deserializer = Window.deserializer || new egis.core.Deserializer();
    Window.container = Window.container || {};
    dsBridge.register('create_SimpleRenderer', function (sourceId, labelField, showLabel, symbol) {
        var options = {
            symbol :Window.deserializer.createJsInstance(JSON.parse(symbol)),
            showLabel: showLabel || false,
            labelField: labelField
        };
        var simpleRenderer = new egis.render.SimpleRenderer(options);
        Window.container[sourceId] = simpleRenderer;
    })

    dsBridge.register('SimpleRenderer_setLabelField', function (sourceId, labelField) {
        var simpleRenderer = Window.container[sourceId];
        simpleRenderer.labelField = labelField;
    })

    dsBridge.register('SimpleRenderer_setShowLabel', function (sourceId, showLabel) {
        var simpleRenderer = Window.container[sourceId];
        simpleRenderer.showLabel = showLabel;
    })

    dsBridge.register('SimpleRenderer_setSymbol', function (sourceId, symbol) {
        var simpleRenderer = Window.container[sourceId];
        simpleRenderer.symbol = Window.deserializer.createJsInstance(JSON.parse(symbol));
    })
})